feat(analytics): app-scoped analytics read endpoint (2/3) - #2192
Open
soamdesai-tfh wants to merge 11 commits into
Open
feat(analytics): app-scoped analytics read endpoint (2/3)#2192soamdesai-tfh wants to merge 11 commits into
soamdesai-tfh wants to merge 11 commits into
Conversation
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 04:36 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 04:43 — with
GitHub Actions
Inactive
soamdesai-tfh
force-pushed
the
feat/world-id-analytics-data
branch
from
July 31, 2026 07:41
2d9c3d9 to
093f412
Compare
soamdesai-tfh
force-pushed
the
feat/world-id-analytics-read
branch
from
July 31, 2026 07:41
7b12100 to
705315e
Compare
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 07:41 — with
GitHub Actions
Inactive
soamdesai-tfh
force-pushed
the
feat/world-id-analytics-read
branch
from
July 31, 2026 14:31
705315e to
268ecfc
Compare
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 14:31 — with
GitHub Actions
Inactive
soamdesai-tfh
force-pushed
the
feat/world-id-analytics-read
branch
from
July 31, 2026 16:46
268ecfc to
3abc011
Compare
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 16:46 — with
GitHub Actions
Inactive
soamdesai-tfh
force-pushed
the
feat/world-id-analytics-read
branch
from
July 31, 2026 21:29
3abc011 to
e7030b9
Compare
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 21:29 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
August 1, 2026 00:59 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
August 3, 2026 00:49 — with
GitHub Actions
Inactive
soamdesai-tfh
marked this pull request as ready for review
August 3, 2026 00:49
GET /api/portal/apps/{app_id}/world-id-analytics: database-backed app
authorization with soft-delete 404s, id resolution against both action
tables with ambiguity/cross-app/cross-environment/wrong-source rejection,
PostgreSQL-side combined app aggregation, UTC zero-filling with the
three All Time start branches, bigint-safe integer-string counts, and
source-specific legacy_actions/actions blocks. Lands the fresh-stack
integration suite and the opt-in million-row load gate, which exercise
the data layer and this endpoint together.
The data slice scoped the fresh-stack runner to its own suites; now that integration.test.ts and million.test.ts exist in this tree, re-extend the default path and restore the --million entrypoint and its package script. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Follows up 2191's action_v3_stats_daily -> action_legacy_stats_daily rename: the field name and alias in get-world-id-analytics.graphql, the endpoint's literal refs and hasV3History/has_v3_history naming, and every test call site (integration.test.ts, million.test.ts, world-id-analytics.test.ts). Regenerated the operation's generated.ts. Also fixes a real bug the rename exposed: integration.test.ts's tracked-table discovery regex hardcoded action_v[34]_stats_daily, so it silently stopped matching the renamed table. Broadened to action_(?:legacy|v4)_stats_daily. Verified: tsc, prettier, unit 26/26, fresh-stack smoke+backfill+ integration 29/29, million gate 1/1 (1M-row backfill+catchup+parity). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
soamdesai-tfh
force-pushed
the
feat/world-id-analytics-read
branch
from
August 3, 2026 21:53
fee4fd4 to
6c3f84d
Compare
soamdesai-tfh
temporarily deployed
to
development
August 3, 2026 21:53 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
August 3, 2026 21:54 — with
GitHub Actions
Inactive
…to feat/world-id-analytics-read
The cron route now reports distinct outcomes and advances at most 30 days per tick, so the integration assertions pin the exact outcome (advanced vs lock_missed) instead of a bare success body, and the million gate's initial 31-day backfill follows the production runbook through backfill_world_id_analytics(1) while the catch-up tick keeps exercising the capped route. Evidence on this tree: fresh-stack default runner green (data-slice suites + integration 19/19), million gate green - 1M-row chunked backfill 506ms, catch-up 42ms, endpoint p95 ~29ms/24ms both periods. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
soamdesai-tfh
temporarily deployed
to
development
August 4, 2026 23:53 — with
GitHub Actions
Inactive
…to feat/world-id-analytics-read
soamdesai-tfh
temporarily deployed
to
development
August 5, 2026 16:46 — with
GitHub Actions
Inactive
…to feat/world-id-analytics-read
… stateless rollup Historical seeds now build through dated route POSTs (the production backfill path) instead of the deleted watermark bootstrap and procedure. The lock-miss tests become queueing tests — a concurrent cron invocation blocks behind the running one and both advance with nothing lost or doubled. The stalled-watermark recovery test becomes the dated repair call it is in production; the deletion race now lands in failed_ranges (the retry input) instead of a 500. The million gate drives the 31-day 1M-row backfill through one dated POST (4 chunks) and proves the cron tick recaptures late rows inside the trailing window; state-table assertions are gone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
soamdesai-tfh
temporarily deployed
to
development
August 6, 2026 01:10 — with
GitHub Actions
Inactive
…to feat/world-id-analytics-read
… failing it Merge-forward of the parent-lock fix: with the rollup pre-locking its parent actions, a mid-chunk deletion queues on the parent (previously it deadlocked as the 40P01 victim, and this test's old choreography let it slip through only because a first-ever rollup locks no child rows). The chunk now completes, the deletion cascades after, and a re-roll of the range stays empty. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
soamdesai-tfh
temporarily deployed
to
development
August 6, 2026 05:37 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second of three (on #2191). The one authenticated read path for all analytics surfaces.
GET /api/portal/apps/{app_id}/world-id-analytics?environment&period[&action_ids]getIsUserAllowedToReadApp(404, no existence leak) + soft-delete 404; missing/cross-app/cross-environment/wrong-source ids reject 400 before any readTests: endpoint unit 26/26, integration 18/18; million gate — 1M rows: backfill via one dated POST 372ms, cron tick 31ms, endpoint p95 <8ms, plans never touch the raw nullifier tables.
Deploy: see #2191.